package core

import (
	"log/slog"

	"github.com/redis/go-redis/v9"
	"gorm.io/gorm"

	"torler.com/qingyue/apps/backend/config"
)

// 公共组件容器
type Container struct {
	Config *config.Config
	DB     *gorm.DB
	R      *redis.Client
	Logger *slog.Logger
}

func NewContainer(config *config.Config, log *slog.Logger) *Container {
	return &Container{
		Config: config,
		Logger: log,
	}
}
